<?php
class domesticAction extends Action
{
	//国内游首页
 public function index(){
		$public=A("public");
		$tophtml=$public->top();
    	
    	
		//获取左边的栏目导航的类别
		$classsys=A("classsys");
		$cladhtm=$classsys->getteshe();
		$countpunlun="(select count(*) from ".DQ."pinglun where pinglun2=tour0) as pinglunnum";
		//---------------获取线路列表
		$sqlpaixu=" order by tour42 desc,tour43 desc,tour48 desc limit 0,10";
		$sqlcns=" and tour44=1212  and tour41='cn' ";
		
		//获取热门线路--城市周边
		$sql="select *,".$countpunlun." from ".DQ."tour where tour13 like '%1285%' and tour50 <>''".$sqlcns.$sqlpaixu;
		$hottour_zhoubian=$public->getRsListBySql($sql);
		
		
		//获取热门线路--国内游
		$sql="select *,".$countpunlun." from ".DQ."tour where tour4=544 and tour13 like '%1285%' ".$sqlcns.$sqlpaixu;
		$hottour_guolei=$public->getRsListBySql($sql);
		
		//获取热门线路--出境游
		$sql="select *,".$countpunlun." from ".DQ."tour where tour4=563 and tour13 like '%1285%' ".$sqlcns.$sqlpaixu;
		$hottour_chuji=$public->getRsListBySql($sql);
		
		
		
		//获取游记攻略
		$myuser=A("user");
		$sql="select * from ".UHDQ."blog as a left join ".UHDQ."space as b on a.uid=b.uid 
			left join ".UHDQ."blogfield as c on a.blogid=c.blogid
		 where c.message like '%<img %'
		order by a.dateline desc limit 0,5";
		$youji=$myuser->getRsListBySql($sql);
		
    	$this->assign("tophtml",$tophtml);
    	$this->assign("hottour_zhoubian",$hottour_zhoubian);
    	$this->assign("hottour_guolei",$hottour_guolei);
    	$this->assign("cladhtm",$cladhtm);
    	$this->assign("hottour_chuji",$hottour_chuji);
    	$this->assign("youji",$youji);
    	
    	$this->display();
    }
	
	
}


?>